Optimal. Leaf size=118 \[ \frac{x \left (c-\frac{a \left (a^2 f-a b e+b^2 d\right )}{b^3}\right )}{2 a \left (a+b x^2\right )}+\frac{\tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right ) \left (-3 a^2 b e+5 a^3 f+a b^2 d+b^3 c\right )}{2 a^{3/2} b^{7/2}}+\frac{x (b e-2 a f)}{b^3}+\frac{f x^3}{3 b^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.119856, antiderivative size = 118, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.111, Rules used = {1814, 1153, 205} \[ \frac{x \left (c-\frac{a \left (a^2 f-a b e+b^2 d\right )}{b^3}\right )}{2 a \left (a+b x^2\right )}+\frac{\tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right ) \left (-3 a^2 b e+5 a^3 f+a b^2 d+b^3 c\right )}{2 a^{3/2} b^{7/2}}+\frac{x (b e-2 a f)}{b^3}+\frac{f x^3}{3 b^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1814
Rule 1153
Rule 205
Rubi steps
\begin{align*} \int \frac{c+d x^2+e x^4+f x^6}{\left (a+b x^2\right )^2} \, dx &=\frac{\left (c-\frac{a \left (b^2 d-a b e+a^2 f\right )}{b^3}\right ) x}{2 a \left (a+b x^2\right )}-\frac{\int \frac{-\frac{b^3 c+a b^2 d-a^2 b e+a^3 f}{b^3}-\frac{2 a (b e-a f) x^2}{b^2}-\frac{2 a f x^4}{b}}{a+b x^2} \, dx}{2 a}\\ &=\frac{\left (c-\frac{a \left (b^2 d-a b e+a^2 f\right )}{b^3}\right ) x}{2 a \left (a+b x^2\right )}-\frac{\int \left (-\frac{2 a (b e-2 a f)}{b^3}-\frac{2 a f x^2}{b^2}+\frac{-b^3 c-a b^2 d+3 a^2 b e-5 a^3 f}{b^3 \left (a+b x^2\right )}\right ) \, dx}{2 a}\\ &=\frac{(b e-2 a f) x}{b^3}+\frac{f x^3}{3 b^2}+\frac{\left (c-\frac{a \left (b^2 d-a b e+a^2 f\right )}{b^3}\right ) x}{2 a \left (a+b x^2\right )}+\frac{\left (b^3 c+a b^2 d-3 a^2 b e+5 a^3 f\right ) \int \frac{1}{a+b x^2} \, dx}{2 a b^3}\\ &=\frac{(b e-2 a f) x}{b^3}+\frac{f x^3}{3 b^2}+\frac{\left (c-\frac{a \left (b^2 d-a b e+a^2 f\right )}{b^3}\right ) x}{2 a \left (a+b x^2\right )}+\frac{\left (b^3 c+a b^2 d-3 a^2 b e+5 a^3 f\right ) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{2 a^{3/2} b^{7/2}}\\ \end{align*}
Mathematica [A] time = 0.0878644, size = 122, normalized size = 1.03 \[ -\frac{x \left (-a^2 b e+a^3 f+a b^2 d-b^3 c\right )}{2 a b^3 \left (a+b x^2\right )}+\frac{\tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right ) \left (-3 a^2 b e+5 a^3 f+a b^2 d+b^3 c\right )}{2 a^{3/2} b^{7/2}}+\frac{x (b e-2 a f)}{b^3}+\frac{f x^3}{3 b^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.009, size = 177, normalized size = 1.5 \begin{align*}{\frac{f{x}^{3}}{3\,{b}^{2}}}-2\,{\frac{afx}{{b}^{3}}}+{\frac{ex}{{b}^{2}}}-{\frac{{a}^{2}xf}{2\,{b}^{3} \left ( b{x}^{2}+a \right ) }}+{\frac{axe}{2\,{b}^{2} \left ( b{x}^{2}+a \right ) }}-{\frac{dx}{2\,b \left ( b{x}^{2}+a \right ) }}+{\frac{cx}{2\,a \left ( b{x}^{2}+a \right ) }}+{\frac{5\,{a}^{2}f}{2\,{b}^{3}}\arctan \left ({bx{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}}-{\frac{3\,ae}{2\,{b}^{2}}\arctan \left ({bx{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}}+{\frac{d}{2\,b}\arctan \left ({bx{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}}+{\frac{c}{2\,a}\arctan \left ({bx{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.70085, size = 761, normalized size = 6.45 \begin{align*} \left [\frac{4 \, a^{2} b^{3} f x^{5} + 4 \,{\left (3 \, a^{2} b^{3} e - 5 \, a^{3} b^{2} f\right )} x^{3} - 3 \,{\left (a b^{3} c + a^{2} b^{2} d - 3 \, a^{3} b e + 5 \, a^{4} f +{\left (b^{4} c + a b^{3} d - 3 \, a^{2} b^{2} e + 5 \, a^{3} b f\right )} x^{2}\right )} \sqrt{-a b} \log \left (\frac{b x^{2} - 2 \, \sqrt{-a b} x - a}{b x^{2} + a}\right ) + 6 \,{\left (a b^{4} c - a^{2} b^{3} d + 3 \, a^{3} b^{2} e - 5 \, a^{4} b f\right )} x}{12 \,{\left (a^{2} b^{5} x^{2} + a^{3} b^{4}\right )}}, \frac{2 \, a^{2} b^{3} f x^{5} + 2 \,{\left (3 \, a^{2} b^{3} e - 5 \, a^{3} b^{2} f\right )} x^{3} + 3 \,{\left (a b^{3} c + a^{2} b^{2} d - 3 \, a^{3} b e + 5 \, a^{4} f +{\left (b^{4} c + a b^{3} d - 3 \, a^{2} b^{2} e + 5 \, a^{3} b f\right )} x^{2}\right )} \sqrt{a b} \arctan \left (\frac{\sqrt{a b} x}{a}\right ) + 3 \,{\left (a b^{4} c - a^{2} b^{3} d + 3 \, a^{3} b^{2} e - 5 \, a^{4} b f\right )} x}{6 \,{\left (a^{2} b^{5} x^{2} + a^{3} b^{4}\right )}}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 1.94261, size = 199, normalized size = 1.69 \begin{align*} - \frac{x \left (a^{3} f - a^{2} b e + a b^{2} d - b^{3} c\right )}{2 a^{2} b^{3} + 2 a b^{4} x^{2}} - \frac{\sqrt{- \frac{1}{a^{3} b^{7}}} \left (5 a^{3} f - 3 a^{2} b e + a b^{2} d + b^{3} c\right ) \log{\left (- a^{2} b^{3} \sqrt{- \frac{1}{a^{3} b^{7}}} + x \right )}}{4} + \frac{\sqrt{- \frac{1}{a^{3} b^{7}}} \left (5 a^{3} f - 3 a^{2} b e + a b^{2} d + b^{3} c\right ) \log{\left (a^{2} b^{3} \sqrt{- \frac{1}{a^{3} b^{7}}} + x \right )}}{4} + \frac{f x^{3}}{3 b^{2}} - \frac{x \left (2 a f - b e\right )}{b^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.16407, size = 170, normalized size = 1.44 \begin{align*} \frac{{\left (b^{3} c + a b^{2} d + 5 \, a^{3} f - 3 \, a^{2} b e\right )} \arctan \left (\frac{b x}{\sqrt{a b}}\right )}{2 \, \sqrt{a b} a b^{3}} + \frac{b^{3} c x - a b^{2} d x - a^{3} f x + a^{2} b x e}{2 \,{\left (b x^{2} + a\right )} a b^{3}} + \frac{b^{4} f x^{3} - 6 \, a b^{3} f x + 3 \, b^{4} x e}{3 \, b^{6}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]